/**
 * 
 */
package com.sigmatrix.h5.annotation;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;


/**
 *验证安卓
 *@ClassName: AndroidValidatorImpl
 *@Description: TODO()
 *@author libin
 *@date 2017年7月7日 下午4:33:01
 */
public class AppNameValidatorImpl implements ConstraintValidator<AppName, String>{
	String name;
	/**(non-Javadoc)
	 *@Title: initialize
	 *@Description: 
	 *@see javax.validation.ConstraintValidator#initialize(java.lang.annotation.Annotation)
	 *@author libin
	 *@date 2017年7月7日 下午4:41:34
	 */
	@Override
	public void initialize(AppName arg0) {
		// TODO Auto-generated method stub
		this.name = arg0.name();
	}

	/**(non-Javadoc)
	 *@Title: isValid
	 *@Description: 
	 *@see javax.validation.ConstraintValidator#isValid(java.lang.Object, javax.validation.ConstraintValidatorContext)
	 *@author libin
	 *@date 2017年7月7日 下午4:41:34
	 */
	@Override
	public boolean isValid(String arg0, ConstraintValidatorContext arg1) {
		if (arg0.equals("SCJ")) {
			return true;
		}else {
			return false;
		}
	}

}

